Skip to content

Added a log message and made umount idempotent - #30

Merged
wknapik merged 5 commits into
mainfrom
wknapik-asdadf
Sep 1, 2026
Merged

wknapik merged 5 commits into
mainfrom
wknapik-asdadf

Conversation

@wknapik

@wknapik wknapik commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Resolves #25

(we could verify that the expected volume is mounted at the supplied mountpoint, and not something else, but I'm treating it as the script caller's concern)

@wknapik wknapik self-assigned this Sep 1, 2026
@wknapik
wknapik requested a review from mihaiplesa as a code owner September 1, 2026 01:46
@wknapik
wknapik marked this pull request as draft September 1, 2026 01:46
@wknapik wknapik changed the title wip Added a log message and made umount idempotent Sep 1, 2026
@wknapik
wknapik marked this pull request as ready for review September 1, 2026 15:08
@wknapik
wknapik enabled auto-merge (squash) September 1, 2026 15:10
@mihaiplesa
mihaiplesa requested a lite review from Copilot September 1, 2026 15:16
mihaiplesa
mihaiplesa previously approved these changes Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the vol CLI script to improve operational UX by making unmount operations idempotent and adding additional debug logging around volume state transitions (per Issue #25).

Changes:

  • Make umount(mountpoint) a no-op (with messaging) when the path is not a mountpoint.
  • Add a debug log when a volume reaches a valid state in wait_for_volume.
  • Minor formatting adjustment in run() options construction.
File summaries
File Description
vol Adds a new debug log in wait_for_volume and makes umount idempotent by gating the unmount call on os.path.ismount().
Review details

Suppressed comments (1)

vol:590

  • umount() always logs "Unmounting …" even when the path is not a mountpoint; with the new idempotent behavior this message becomes inaccurate/confusing. Log the unmount action only when ismount(mountpoint) is true.
def umount(mountpoint, force = False):
    msg(f'Unmounting {mountpoint}')
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread vol Resolved
auto-merge was automatically disabled September 1, 2026 15:20

Head branch was modified

@wknapik
wknapik merged commit e5fc697 into main Sep 1, 2026
4 checks passed
@wknapik
wknapik deleted the wknapik-asdadf branch September 1, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make umount idempotent

3 participants